diff --git a/index.php b/index.php
index 604ed86..4e5a1bb 100644
--- a/index.php
+++ b/index.php
@@ -65,27 +65,15 @@ if ($course->format == 'weeks') {
     $table->align = array ('left', 'left', 'left');
 }
 
-$groups = groups_get_user_groups($course->id, $USER->id);
-$groupid = '';
-$groupmode = '';
-
-if (array_key_exists(0, $groups)) {
-    $groupid = '&amp;group='.current($groups[0]);
-}
 
 foreach ($adobeconnects as $adobeconnect) {
-    $group = $groupid;
-
-    if (0 == $adobeconnect->groupmode) {
-        $group = '&amp;group=0';
-    }
 
     if (!$adobeconnect->visible) {
         //Show dimmed if the mod is hidden
-        $link = '<a class="dimmed" href="view.php?id='.$adobeconnect->coursemodule.$group.'">'.format_string($adobeconnect->name).'</a>';
+        $link = '<a class="dimmed" href="view.php?id='.$adobeconnect->coursemodule.'">'.format_string($adobeconnect->name).'</a>';
     } else {
         //Show normal if the mod is visible
-        $link = '<a href="view.php?id='.$adobeconnect->coursemodule.$group.'">'.format_string($adobeconnect->name).'</a>';
+        $link = '<a href="view.php?id='.$adobeconnect->coursemodule.'">'.format_string($adobeconnect->name).'</a>';
     }
 
     if ($course->format == 'weeks' or $course->format == 'topics') {
@@ -102,4 +90,4 @@ print_table($table);
 
 print_footer($course);
 
-?>
+?>
\ No newline at end of file
diff --git a/view.php b/view.php
index 283063b..66c9147 100644
--- a/view.php
+++ b/view.php
@@ -18,7 +18,6 @@ require_once(dirname(__FILE__).'/connect_class_dom.php');
 
 $id = optional_param('id', 0, PARAM_INT); // course_module ID, or
 $a  = optional_param('a', 0, PARAM_INT);  // adobeconnect instance ID
-$groupid = optional_param('group', 0, PARAM_INT);
 
 if ($id) {
     if (! $cm = get_coursemodule_from_id('adobeconnect', $id)) {
@@ -73,33 +72,75 @@ $navigation = build_navigation($navlinks);
 print_header_simple(format_string($adobeconnect->name), '', $navigation, '', '', true,
               update_module_button($cm->id, $course->id, $stradobeconnect), navmenu($course, $cm));
 
-// Check for empy group id, if empty check if this user belongs to any
-// group in the course and set the first group found as the default.
+// Check for empty group id, if empty check if this user belongs to any
+// group in the course and set the first group found as the default,
+// unless the user has the 'accessallgroups' permission in which
+// case all meetings can be displayed on the one page
 // This is required for the groups selection drop down box and for the
 // initial display of the meeting details.
 
-if (0 != $cm->groupmode){
-    if (empty($groupid)) {
-        $groups = groups_get_user_groups($course->id, $usrobj->id);
+// groupings are ignored when not enabled
+if (empty($CFG->enablegroupings)) {
+    $cm->groupingid = 0;
+}
+//All groups for this grouping in course
+//mimic return format of groups_get_user_groups()
+$crsgroups = groups_get_all_groups($course->id, 0, $cm->groupingid);
+if (!empty($crsgroups)) {
+    $crsgroups[$cm->groupingid] = array_keys($crsgroups);
+} else {
+    $crsgroups[$cm->groupingid] = array();
+}
 
-        if (array_key_exists(0, $groups)) {
-            $groupid = current($groups[0]);
-        }
+//group(s) to display meeting(s) for
+$groups = array();
+//group(s) user is enrolled in
+$context = get_context_instance(CONTEXT_MODULE, $id);
+if ($cm->groupmode == NOGROUPS) {
+    $allowedgroups = array();
+} elseif (has_capability('moodle/site:accessallgroups', $context)) {
+    $allowedgroups =  $crsgroups;
+} else {
+    $allowedgroups = groups_get_user_groups($course->id, $USER->id);
+    if (empty($allowedgroups) || !isset($allowedgroups[$cm->groupingid]) || empty($allowedgroups[$cm->groupingid])) {
+        notice(get_string('usergrouprequired', 'adobeconnect'));
+    }
+}
 
-        if (empty($groupid)) {
+// Select active group for this user in this group/grouping
+// (override with group ID in url if provided)
+// Select default if not specified
+// This call also checks permissions so we shouldn't have to
+if ($cm->groupmode == NOGROUPS) {
+    $activitymenu = '';
+    $groupid = 0;
+    $groups[$cm->groupingid][$groupid] = $groupid;
+} else {
+    // groups_print_activity_menu() needs to be called before group_get_activity_group() so that it can 
+    // clean up the activegroup in the session when (as an admin) you are logging in as multiple users
+    // the menu is printed further down in the code, where groups_print_activity_menu() was initially called
+    $activitymenu = groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/adobeconnect/view.php?id='.$id, true);
+    $groupid = groups_get_activity_group($cm, true);
+    if (empty($groupid)) { 
+        $context = get_context_instance(CONTEXT_MODULE, $id);
+        if (has_capability('moodle/site:accessallgroups', $context)) {
             $groupid = 0;
-            notify(get_string('usergrouprequired', 'adobeconnect'));
-            print_footer($course);
-            die();
+            //mimic return format of groups_get_user_groups()
+            $groups = $crsgroups;
+        } else {
+            $groupid = current($allowedgroups[$cm->groupingid]);
+            if ($cm->groupmode == SEPARATEGROUPS) {
+                $groups[$cm->groupingid][$groupid] = $groupid;
+            } elseif ($cm->groupmode == VISIBLEGROUPS) {
+                $groups = $crsgroups;
+            }
         }
+    } else {
+        $groups[$cm->groupingid][$groupid] = $groupid;
     }
-} else {
-    $groupid = 0;
-}
+} 
 
 /// Print the main part of the page
-$usrgroups = groups_get_user_groups($cm->course, $usrobj->id);
-$usrgroups = $usrgroups[0]; // Just want groups and not groupings
 
 $sql = "SELECT meetingscoid FROM {$CFG->prefix}adobeconnect_meeting_groups amg WHERE ".
        "amg.instanceid = {$cm->instance}";
@@ -268,220 +309,229 @@ if (($formdata = data_submitted($CFG->wwwroot . '/mod/adobeconnect/view.php')) &
     }
 }
 
-if ($cm->groupmode) {
-    groups_print_course_menu($course, "view.php?id=$id");
-}
+//print group selector
+echo $activitymenu;
 
 $aconnect = aconnect_login();
 
 // Get the Meeting details
-$scoid = get_field('adobeconnect_meeting_groups', 'meetingscoid', 'instanceid', $adobeconnect->id, 'groupid', $groupid);
-$meetfldscoid = aconnect_get_folder($aconnect, 'meetings');
-$filter = array('filter-sco-id' => $scoid);
-
-if (($meeting = aconnect_meeting_exists($aconnect, $meetfldscoid, $filter))) {
-    $meeting = current($meeting);
-} else {
-    notice(get_string('nomeeting', 'adobeconnect'), '', $course);
-    aconnect_logout($aconnect);
-    die();
-}
+foreach ($groups[$cm->groupingid] as $groupid) {
+    $scoid = get_field('adobeconnect_meeting_groups', 'meetingscoid', 'instanceid', $adobeconnect->id, 'groupid', $groupid);
+    $meetfldscoid = aconnect_get_folder($aconnect, 'meetings');
+    $filter = array('filter-sco-id' => $scoid);
 
+    if (($meetings = aconnect_meeting_exists($aconnect, $meetfldscoid, $filter)) && isset($meetings[$scoid])) {
+        $meeting = $meetings[$scoid];
+    } else {
+        aconnect_logout($aconnect);
+        notice(get_string('nomeeting', 'adobeconnect'), '', $course);
+    }
 
-aconnect_logout($aconnect);
+    $context = get_context_instance(CONTEXT_MODULE, $cm->id);
 
-$context = get_context_instance(CONTEXT_MODULE, $cm->id);
+    $sesskey = !empty($usrobj->sesskey) ? $usrobj->sesskey : '';
 
-$sesskey = !empty($usrobj->sesskey) ? $usrobj->sesskey : '';
+    echo '<br /><br />';
+    echo '<form name="meetingdetail" action="' . $CFG->wwwroot . '/mod/adobeconnect/view.php" method="post">' . "\n";
 
-echo '<br /><br />';
-echo '<form name="meetingdetail" action="' . $CFG->wwwroot . '/mod/adobeconnect/view.php" method="post">' . "\n";
+    // print meeting detail field set
+    echo '<div id="aconfldset1" class="aconfldset">'."\n";
+    echo '<fieldset>'."\n";
 
-// print meeting detail field set
-echo '<div id="aconfldset1" class="aconfldset">'."\n";
-echo '<fieldset>'."\n";
+    echo '<legend>'.get_string('meetinginfo', 'adobeconnect').'</legend>'."\n";
 
-echo '<legend>'.get_string('meetinginfo', 'adobeconnect').'</legend>'."\n";
+    echo '<div class="aconmeetinforow">'."\n";
 
-echo '<div class="aconmeetinforow">'."\n";
+    echo '<div class="aconlabeltitle" id="aconmeetnametitle">'."\n";
+    echo '<label for="lblmeetingnametitle">'.get_string('meetingname', 'adobeconnect').':</label>'."\n";
+    echo '</div>'."\n";
 
-echo '<div class="aconlabeltitle" id="aconmeetnametitle">'."\n";
-echo '<label for="lblmeetingnametitle">'.get_string('meetingname', 'adobeconnect').':</label>'."\n";
-echo '</div>'."\n";
+    echo '<div class="aconlabeltext" id="aconmeetnametxt">'."\n";
+    echo '<label for="lblmeetingname">'.format_string($meeting->name).'</label><br />'."\n";
+    echo '</div>'."\n";
 
-echo '<div class="aconlabeltext" id="aconmeetnametxt">'."\n";
-echo '<label for="lblmeetingname">'.format_string($meeting->name).'</label><br />'."\n";
-echo '</div>'."\n";
+    echo '</div>'."\n";
 
-echo '</div>'."\n";
+    if (has_capability('mod/adobeconnect:meetingpresenter', $context) or
+        has_capability('mod/adobeconnect:meetinghost', $context)) {
 
-if (has_capability('mod/adobeconnect:meetingpresenter', $context) or
-    has_capability('mod/adobeconnect:meetinghost', $context)) {
+        // Get HTTPS setting
+        $https      = false;
+        $protocol   = 'http://';
+        if (isset($CFG->adobeconnect_https) and (!empty($CFG->adobeconnect_https))) {
+            $https      = true;
+            $protocol   = 'https://';
+        }
 
-    // Get HTTPS setting
-    $https      = false;
-    $protocol   = 'http://';
-    if (isset($CFG->adobeconnect_https) and (!empty($CFG->adobeconnect_https))) {
-        $https      = true;
-        $protocol   = 'https://';
-    }
+        // Include the port number only if it is a port other than 80
+        $port = '';
 
-    // Include the port number only if it is a port other than 80
-    $port = '';
+        if (!empty($CFG->adobeconnect_port) and (80 != $CFG->adobeconnect_port)) {
+            $port = ':' . $CFG->adobeconnect_port;
+        }
 
-    if (!empty($CFG->adobeconnect_port) and (80 != $CFG->adobeconnect_port)) {
-        $port = ':' . $CFG->adobeconnect_port;
-    }
+        $url = $protocol . $CFG->adobeconnect_meethost . $port
+               . $meeting->url;
+        echo '<div class="aconmeetinforow">'."\n";
 
-    $url = $protocol . $CFG->adobeconnect_meethost . $port
-           . $meeting->url;
-    echo '<div class="aconmeetinforow">'."\n";
+        echo '<div class="aconlabeltitle" id="aconmeeturltitle">'."\n";
+        echo '<label for="lblmeetingurltitle">'.get_string('meeturl', 'adobeconnect').':</label>'."\n";
+        echo '</div>'."\n";
 
-    echo '<div class="aconlabeltitle" id="aconmeeturltitle">'."\n";
-    echo '<label for="lblmeetingurltitle">'.get_string('meeturl', 'adobeconnect').':</label>'."\n";
-    echo '</div>'."\n";
+        echo '<div class="aconlabeltext" id="aconmeeturltext">'."\n";
+        echo '<label for="lblmeetingurl">'.$url.'</label><br />'."\n";
+        echo '</div>'."\n";
 
-    echo '<div class="aconlabeltext" id="aconmeeturltext">'."\n";
-    echo '<label for="lblmeetingurl">'.$url.'</label><br />'."\n";
-    echo '</div>'."\n";
+        echo '</div>'."\n";
 
-    echo '</div>'."\n";
+        echo '<div class="aconmeetinforow">'."\n";
 
-    echo '<div class="aconmeetinforow">'."\n";
+        echo '<div class="aconlabeltitle" id="aconmeetinfotitle">'."\n";
+        echo '<label for="lblmeetinginfotitle">'.get_string('meetinfo', 'adobeconnect').':</label>'."\n";
+        echo '</div>'."\n";
 
-    echo '<div class="aconlabeltitle" id="aconmeetinfotitle">'."\n";
-    echo '<label for="lblmeetinginfotitle">'.get_string('meetinfo', 'adobeconnect').':</label>'."\n";
-    echo '</div>'."\n";
+        $url = $protocol.$CFG->adobeconnect_meethost.$port.'/admin/meeting/sco/info?principal-id='.
+               $usrprincipal.'&amp;sco-id='.$scoid.'&amp;session='.$adobesession;
+        echo '<div class="aconlabeltext" id="aconmeetinfotext">'."\n";
+        echo '<a href="'. $url . '" target="_blank">'. get_string('meetinfotxt', 'adobeconnect') . '</a><br />'."\n";
+        echo '</div>'."\n";
 
-    $url = $protocol.$CFG->adobeconnect_meethost.$port.'/admin/meeting/sco/info?principal-id='.
-           $usrprincipal.'&amp;sco-id='.$scoid.'&amp;session='.$adobesession;
-    echo '<div class="aconlabeltext" id="aconmeetinfotext">'."\n";
-    echo '<a href="'. $url . '" target="_blank">'. get_string('meetinfotxt', 'adobeconnect') . '</a><br />'."\n";
-    echo '</div>'."\n";
+        echo '</div>'."\n";
 
-    echo '</div>'."\n";
+    //    echo '<div class="aconbtninfo">'."\n";
+    //    echo button_to_popup_window('www.google.ca',
+    //                                'btnname', get_string('joinmeeting', 'adobeconnect'), 900, 900, null, null, true);
+    //    echo '</div>'."\n";
 
-//    echo '<div class="aconbtninfo">'."\n";
-//    echo button_to_popup_window('www.google.ca',
-//                                'btnname', get_string('joinmeeting', 'adobeconnect'), 900, 900, null, null, true);
-//    echo '</div>'."\n";
+    //$port = '';
+    //    echo '<div class="aconbtninfo">'."\n";
+    //    $infourl= $protocol.$CFG->adobeconnect_meethost.$port.'/admin/meeting/sco/info?principal-id='.
+    //            $usrprincipal.'&amp;sco-id='.$scoid.'&amp;session='.$adobesession;
+    //    echo '<input type="button" name="info" value="'.get_string('meetinginfo', 'adobeconnect').
+    //        '" onClick="window.open(\''.$infourl.'\',\'meetinginfo\',\'dependent=no\'); return false;">';
+    //    echo '</div>'."\n";
 
-//$port = '';
-//    echo '<div class="aconbtninfo">'."\n";
-//    $infourl= $protocol.$CFG->adobeconnect_meethost.$port.'/admin/meeting/sco/info?principal-id='.
-//            $usrprincipal.'&amp;sco-id='.$scoid.'&amp;session='.$adobesession;
-//    echo '<input type="button" name="info" value="'.get_string('meetinginfo', 'adobeconnect').
-//        '" onClick="window.open(\''.$infourl.'\',\'meetinginfo\',\'dependent=no\'); return false;">';
-//    echo '</div>'."\n";
 
 
+    //---------
 
-//---------
 
+    }
 
-}
+    echo '<div class="aconmeetinforow">'."\n";
 
-echo '<div class="aconmeetinforow">'."\n";
+    echo '<div class="aconlabeltitle" id="aconmeetstarttitle">'."\n";
+    echo '<label for="lblmeetingstarttitle">'.get_string('meetingstart', 'adobeconnect').':</label>'."\n";
+    echo '</div>'."\n";
 
-echo '<div class="aconlabeltitle" id="aconmeetstarttitle">'."\n";
-echo '<label for="lblmeetingstarttitle">'.get_string('meetingstart', 'adobeconnect').':</label>'."\n";
-echo '</div>'."\n";
+    //  CONTRIB-2929 - remove date format and let Moodle decide the format
+    $time = userdate($adobeconnect->starttime);
+    echo '<div class="aconlabeltext" id="aconmeetstarttxt">'."\n";
+    echo '<label for="lblmeetingstart">'.$time.'</label><br />'."\n";
+    echo '</div>'."\n";
 
-//  CONTRIB-2929 - remove date format and let Moodle decide the format
-$time = userdate($adobeconnect->starttime);
-echo '<div class="aconlabeltext" id="aconmeetstarttxt">'."\n";
-echo '<label for="lblmeetingstart">'.$time.'</label><br />'."\n";
-echo '</div>'."\n";
+    echo '</div>'."\n";
 
-echo '</div>'."\n";
+    echo '<div class="aconmeetinforow">'."\n";
 
-echo '<div class="aconmeetinforow">'."\n";
+    echo '<div class="aconlabeltitle" id="aconmeetendtitle">'."\n";
+    echo '<label for="lblmeetingendtitle">'.get_string('meetingend', 'adobeconnect').':</label>'."\n";
+    echo '</div>'."\n";
 
-echo '<div class="aconlabeltitle" id="aconmeetendtitle">'."\n";
-echo '<label for="lblmeetingendtitle">'.get_string('meetingend', 'adobeconnect').':</label>'."\n";
-echo '</div>'."\n";
+    $time = userdate($adobeconnect->endtime);
+    echo '<div class="aconlabeltext" id="aconmeetendtxt">'."\n";
+    echo '<label for="lblmeetingend">'.$time.'</label><br />'."\n";
+    echo '</div>'."\n";
 
-$time = userdate($adobeconnect->endtime);
-echo '<div class="aconlabeltext" id="aconmeetendtxt">'."\n";
-echo '<label for="lblmeetingend">'.$time.'</label><br />'."\n";
-echo '</div>'."\n";
+    echo '</div>'."\n";
 
-echo '</div>'."\n";
+    echo '<div class="aconmeetinforow">'."\n";
 
-echo '<div class="aconmeetinforow">'."\n";
+    echo '<div class="aconlabeltitle" id="aconmeetsummarytitle">'."\n";
+    echo '<label for="lblmeetingsummarytitle">'.get_string('meetingintro', 'adobeconnect').':</label>'."\n";
+    echo '</div>'."\n";
 
-echo '<div class="aconlabeltitle" id="aconmeetsummarytitle">'."\n";
-echo '<label for="lblmeetingsummarytitle">'.get_string('meetingintro', 'adobeconnect').':</label>'."\n";
-echo '</div>'."\n";
+    echo '<div class="aconlabeltext" id="aconmeetsummarytxt">'."\n";
+    echo '<label for="lblmeetingsummary">'. format_string($adobeconnect->intro) .'</label><br />'."\n";
+    echo '</div>'."\n";
 
-echo '<div class="aconlabeltext" id="aconmeetsummarytxt">'."\n";
-echo '<label for="lblmeetingsummary">'. format_string($adobeconnect->intro) .'</label><br />'."\n";
-echo '</div>'."\n";
+    echo '</div>'."\n";
 
-echo '</div>'."\n";
+    echo '</fieldset>'."\n";
+    echo '</div>'."\n";
 
-echo '</fieldset>'."\n";
-echo '</div>'."\n";
+    echo '<br />';
 
-echo '<br />';
+    echo '<div class="aconbtnrow">'."\n";
 
-echo '<div class="aconbtnrow">'."\n";
+    // If group mode is on, and the meetings are not public, make sure only allowed groups have 'join' button
+    // Implement for 'visible groups' where students can see other users' groups
+    // Implement for 'separate groups' in case tutor has 'accessallgroups' but is not a host
+    $context = get_context_instance(CONTEXT_MODULE, $id);
+        
+    if (!$cm->groupmode == NOGROUPS && !$adobeconnect->meetingpublic && !has_capability('moodle/site:accessallgroups', $context) && !in_array($groupid, $allowedgroups[$cm->groupingid])) {
+        // No join button
+        // Option: could have a greyed-out join button
+        debugging("User can see this meeting but does not have permission to join it.", DEBUG_DEVELOPER);
+    } else {
+        echo '<div class="aconbtnjoin">'."\n";
+        echo button_to_popup_window('/mod/adobeconnect/join.php?id='.$id.'&amp;sesskey='.$sesskey.'&amp;groupid='.$groupid,
+                                    'btnname', get_string('joinmeeting', 'adobeconnect'), 900, 900, null, null, true);
+        echo '</div>'."\n";
+    }
+    if (has_capability('mod/adobeconnect:meetingpresenter', $context, $usrobj->id) or
+        has_capability('mod/adobeconnect:meetinghost', $context, $usrobj->id)){
+        echo '<div class="aconbtnroles">'."\n";
+        echo '<input type="submit" name="participants" value="'.get_string('selectparticipants', 'adobeconnect').'">';
+        echo '</div>'."\n";
 
-echo '<div class="aconbtnjoin">'."\n";
-echo button_to_popup_window('/mod/adobeconnect/join.php?id='.$id.'&amp;sesskey='.$sesskey.'&amp;groupid='.$groupid,
-                            'btnname', get_string('joinmeeting', 'adobeconnect'), 900, 900, null, null, true);
-echo '</div>'."\n";
+    }
 
-if (has_capability('mod/adobeconnect:meetingpresenter', $context, $usrobj->id) or
-    has_capability('mod/adobeconnect:meetinghost', $context, $usrobj->id)){
-    echo '<div class="aconbtnroles">'."\n";
-    echo '<input type="submit" name="participants" value="'.get_string('selectparticipants', 'adobeconnect').'">';
     echo '</div>'."\n";
 
-}
+    echo '<input type="hidden" name="id" value="'.$id.'">'."\n";
+    echo '<input type="hidden" name="group" value="'.$groupid.'">'."\n";
+    echo '<input type="hidden" name="sesskey" value="'.$sesskey.'">'."\n";
 
-echo '</div>'."\n";
+    echo '</form>'."\n";
 
-echo '<input type="hidden" name="id" value="'.$id.'">'."\n";
-echo '<input type="hidden" name="group" value="'.$groupid.'">'."\n";
-echo '<input type="hidden" name="sesskey" value="'.$sesskey.'">'."\n";
+    echo '<br />';
 
-echo '</form>'."\n";
 
-echo '<br />';
+    $showrecordings = false;
+    // Check if meeting is private, if so check the user's capability.  If public show recorded meetings
+    if (!$adobeconnect->meetingpublic) {
+        if (has_capability('mod/adobeconnect:meetingpresenter', $context, $usrobj->id) or
+            has_capability('mod/adobeconnect:meetingparticipant', $context, $usrobj->id)) {
+                $showrecordings = true;
+        }
+    } else {
+        $showrecordings = true;
+    }
 
+    if ($showrecordings && isset($recordings) && isset($recordings[$groupid]) && !empty($recordings[$groupid])) {
 
-$showrecordings = false;
-// Check if meeting is private, if so check the user's capability.  If public show recorded meetings
-if (!$adobeconnect->meetingpublic) {
-    if (has_capability('mod/adobeconnect:meetingpresenter', $context, $usrobj->id) or
-        has_capability('mod/adobeconnect:meetingparticipant', $context, $usrobj->id)) {
-            $showrecordings = true;
-    }
-} else {
-    $showrecordings = true;
-}
+        echo '<div id="aconfldset2" class="aconfldset">'."\n";
+        echo '<fieldset>'."\n";
+        echo '<legend>'.get_string('recordinghdr', 'adobeconnect').'</legend>'."\n";
 
-if ($showrecordings && isset($recordings) && isset($recordings[$groupid]) && !empty($recordings[$groupid])) {
+        echo '<div class="aconrecording">'."\n";
+        foreach ($recordings[$groupid] as $recording_scoid => $recording) {
+            echo '<div class="aconrecordingrow">'."\n";
+            echo '<a href="joinrecording.php?id=' . $id. '&recording='. $recording_scoid .
+                 '&groupid=' . $groupid . '&sesskey=' . $USER->sesskey .
+                 '" target="_blank">'. format_string($recording->name) .'</a><br />';
+            echo '</div>'."\n";
+        }
+        echo '</div>'."\n";
 
-    echo '<div id="aconfldset2" class="aconfldset">'."\n";
-    echo '<fieldset>'."\n";
-    echo '<legend>'.get_string('recordinghdr', 'adobeconnect').'</legend>'."\n";
-
-    echo '<div class="aconrecording">'."\n";
-    foreach ($recordings[$groupid] as $recording_scoid => $recording) {
-        echo '<div class="aconrecordingrow">'."\n";
-        echo '<a href="joinrecording.php?id=' . $id. '&recording='. $recording_scoid .
-             '&groupid=' . $groupid . '&sesskey=' . $USER->sesskey .
-             '" target="_blank">'. format_string($recording->name) .'</a><br />';
+        echo '</fieldset>'."\n";
         echo '</div>'."\n";
     }
-    echo '</div>'."\n";
-
-    echo '</fieldset>'."\n";
-    echo '</div>'."\n";
 }
 
+aconnect_logout($aconnect);
+
 add_to_log($course->id, 'adobeconnect', 'view',
            "view.php?id=$cm->id", "View {$adobeconnect->name} details", $cm->id);
 
